package com.xzc.pojo.response;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;

import java.util.List;

/**
 * @author 熊志聪
 * @Classname AccountInfo
 * @Description account
 * @Date 2021/12/14 20:46
 */
@Data
@Slf4j
public class AccountInfo {
    private String title;
//    private Map<String,Object> pager;
    private User user;
//    private String groups;
    private List<Dept> deptPath;
    public Integer getParentDept(){
        for(Dept dept:deptPath){
            if(user.getDept().equals(dept.getId())){
                return dept.getParent();
            }
        }
        return null;
    }
}
